cmake_minimum_required(VERSION 2.8.7)

project(Iletisim)

find_package(Qt4 COMPONENTS QtCore REQUIRED)
include(${QT_USE_FILE})

find_package(WindowsSDK REQUIRED)

add_definitions(-DSUNUCU_DLL_DERLEME -DUNICODE -D_UNICODE)

set(COMMON_HEADERS
		SunucuDll.h
		IIletici.h
		IBtutSunucu.h
)

set(KULLANICI_SOURCES
		Iletici.cpp
		IstemciVeriDenetcisi.cpp
)
set(KULLANICI_HEADERS
		Iletici.h
		IstemciVeriDenetcisi.h
		SunucuDll.h
		${COMMON_HEADERS}
)

set(DLL_SOURCES
		BtutSunucuWin.cpp
		SunucuDll.cpp
)
set(DLL_HEADERS
		BtutSunucuWin.h
		SunucuDll.h
		${COMMON_HEADERS}
)

set( MOC_KULLANICI 
		Iletici.h 
	)

# Qt Preprocessing
qt4_wrap_cpp(MOC_KULLANICI_GEN ${MOC_KULLANICI})

# File Filters
source_group("Generated Files" FILES ${MOC_KULLANICI})

# Library
add_library(BTutDll   		SHARED 	${DLL_SOURCES}			${DLL_HEADERS})
add_library(Iletisim   				${KULLANICI_SOURCES}	${KULLANICI_HEADERS}	${MOC_KULLANICI_GEN})

# Dependancies
target_link_libraries(BTutDll 		Ortak ${WINSDK_LIBRARIES}) #WIN_LIBRARIES ??? 
target_link_libraries(Iletisim 		Ortak ${QT_LIBRARIES})
